<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8" />
    <title>ECharts</title>
    <script src="./echarts.min.js"></script>
  </head>
  <body>
  
    <div id="main" style="width: 600px;height:400px;"></div>
    <script type="text/javascript">
      // var chart = document.getElementById('main');
      // var myChart = echarts.init(chart);

      var myChart = echarts.init(document.getElementById('main'));
    
      var option = {
        title: {
          text:'大数据2032班'
        },
        tooltip: {
          data:['到课率']
        },
        legend: {},
        xAxis: {
          data:['a1','a2','a3']
        },
        yAxis: {},
        series: [
          {
            type:'bar',
            data:[5,3,9],
            name:'到课率'
          }
        ]
      };

      myChart.on('click',function(params){
        console.log(params.name)
      })


      myChart.setOption(option);




    </script>
  </body>
</html>
